The present invention relates generally to a storage controlling apparatus and, more particularly, to a storage controlling apparatus to control a disk storage device having a rotary type storage medium, such as a floppy disk, a magnetic disk, an optical disk and a magneto-optic disk.
Further, the present invention relates generally to a method of controlling a disk storage device and, more particularly, to a method of controlling the disk storage device having a rotary type storage medium, such as floppy disk, a magnetic disk, an optical disk and a magneto-optic disk.
Moreover, the present invention relates generally to a method of managing compressed data and, more particularly, to a method of managing compressed data in a disk storage device having a rotary type storage medium, such as a floppy disk, a magnetic disk, an optical disk and a magneto-optic disk.
With an advancement of software and a spread of multimedia, the data in a variety of forms such as images, voices, fonts, etc. are dealt with. Then, a disk storage device having a larger storage capacity is demanded to store such data.
Successive introductions of the disk storage devices having large storage capacities are not economical, and a change in the system involves a loss of time, which is not an ignorable aspect.
Then, there is developed a technology of apparently increasing the capacity of the disk storage device by compressing the data (hereinafter simply expressed by a compression) instead of an augment in a capacity of the disk storage device. This data compression is conducted by use of software on one hand and by use of hardware on the other hand.
The software-assisted compression is actualized as one function of, e.g., an OS (Operating System). Then, when an application outputs an item of write data, the data is automatically compressed and recorded on a disk recording device.
On the other hand, the hardware-assisted compression is actualized as one function of an apparatus interposed between a host (computer, etc.) and the disk recording device. Such an apparatus is termed a in the present specification.
According to this storage controlling apparatus, the write data outputted from the host is compressed and written (recorded) to the disk storage device. A record position of the write data after being compressed is, however, normally different from a write position designated from the host.
It is because a data length of the post-compression write data is normally smaller than a data length of the write data outputted from the host. Therefore, if the post-compression write data is recorded in the write position designated from the host, an unused record area is generated, with the result that the disk storage device is not effectively employed.
Then, it is required that the disk storage device be effectively used by recording the compressed data in a position different from the write position designated from the host. This kind of technique is called a in the present specification.
For example, a CFS (Cluster File System), an LFS (Log File System), a fixed mapping system, etc., are known as a compressed data management.
Based on the CFS, one or more pieces of write data are assembled into one item of data and thereafter compressed, thereby generating the data known as a compressed segment. Then, these compressed segments are classified according to sizes (data lengths) thereof. Subsequently, the compressed segments each having the same size are recorded on the disk recording device, thus, managing the compressed data. Note that a size of the compressed segment serves to determine which area on the disk recording device to record the compressed segment.
According to the LFS, each time the data is updated, the updated data is written to a rearmost area on the disk storage device that is now used, and the pre-updating compressed data is invalidated. Then, cleaning (rearrangement) such as a garbage collection, etc. is executed for a null time, and invalid data extending from a head down to a rearmost area are compacted, thus, managing the compressed data.
According to the fixed mapping system, the compressed data are managed by making use of a mapping table created in accordance with (preset) stages of compression ratios of the compressed data. The fixed mapping system requires an exceptional process for the data compressed at a compression ratio under the set compression ratio. The exceptional process may be a process of writing the data having an unexpected data length in an area secured otherwise.
In the case of the above software-assisted compression, a CPU time consumes for the compression processing, resulting in such a defect that an extra load is applied on the CPU.
On the other hand, in the case of the hardware-assisted compression, though no extra load is applied on the CPU, the following problems arise.
To start with, the CFS has a possibility in which a seek happens many times because of a record position on the disk storage device being different per compressed segment, and a reading/writing performance declines. Further, when the area for recording the compressed segment having a given size (data length) is full of the compressed segments, the problem is how the compressed segments of the same size are recorded.
Next, the LFS presents a problem in which a usability remarkably declines due to a temporary inaccessibility from the host during the cleaning operation.
The present invention relates to a storage controlling apparatus capable of performing a software-unassisted compression by controlling a disk storage device.
Further, the present invention relates to a method of controlling a disk storage device for performing the software-unassisted compression.
Moreover, the present invention relates to a method of managing compressed data that is capable of making a compression ratio effective, avoiding a decline of usability due to cleaning and optimizing a seek.
The present invention provides a method of managing compressed data, including: an allocating operation allocating a compressed segment representing data that is obtained by assembling plural pieces of the data requested to write, and compressing the assembled data to a compression sector representing a block having a predetermined length; a compression sector recording operation recording the compression sector including at least one compressed segment on a disk storage device; an invalid data area changing operation changing, when updating content of the compressed segment in the compression sector recorded in said disk storage device, an area storing the compressed segment corresponding to an updating target into an invalid data area, wherein the compressed segment corresponding to the updating target in the invalid data area becomes invalid data by updating; a comparing operation comparing a size of the invalid data area in the compression sector recorded in said disk storage device with a preset fiducial value, with respect to each compression sector recorded in the disk storage device; an operation of determining whether the size of the invalid data area is larger than the preset fiducial value; and a releasing process executing operation reading, from the disk storage device when determining that the size of invalid data is larger than the preset fiducial value with respect to a certain compression sector, all of the compressed segments, exclusive of the invalid data, being allocated to the certain compression sector releasing a storage area of the disk storage device recording the certain compression sector.
The present invention provides a compressed data managing apparatus, including: means for allocating one or more compressed segments to at least one compression sector, each compressed segment representing data that is obtained by assembling plural pieces of the data requested to write, and compressing the assembled data, and the compression sector representing a block having a predetermined length; means for recording the compression sector allocated with at least one compressed segment on a disk storage device; means for changing, when updating content of the compressed segment in the compression sector recorded in the disk storage device, an area storing the compressed segment corresponding to an updating target included in the compression sector into an invalid data area, wherein the compressed segment corresponding to the updating target in the invalid data area becomes invalid data by updating; means for comparing a size of the invalid data area in the compression sector with a preset fiducial value, with respect to each compression sector recorded in the disk storage device; means for determining whether the size of the invalid data area is larger than the preset fiducial value; and means for reading, from the disk storage device, when determining that the size of invalid data area is larger than the preset fiducial value with respect to certain compression sector, all of the compressed segments, exclusive of the invalid data, being allocated to the certain compression sector and releasing a storage area of the disk storage device recording the certain compression sector.